<?php

namespace RedMVC;

/**
 * Config class
 *
 * @category    RedMVC
 * @author      Jan Fischer, bitWorking <info@bitworking.de>
 */
class Config{

    private $iniArray = array();

    public function __construct($configFile){		
		if(file_exists($configFile)){
            $this->iniArray = parse_ini_file($configFile);            
		}
	}
	
	public function __get($name){
        if(array_key_exists($name, $this->iniArray)){
            return $this->iniArray[$name];
        }
        return null;
    }
    
    public function __isset($name){
        return isset($this->iniArray[$name]);
    }
    
    public function getArray(){
        return $this->iniArray;
    }
}